const fs = require('fs')

const Route = require('koa-router')
const router = new Route()

fs.readdirSync(__dirname).forEach(file=>{
    // console.log(file);
    if(file !== 'index.js'){
        let r = require('./'+file)
        router.use(r.routes())
    }
})

module.exports = router